<template>
	<view class="">
		<view class="bgIndex ">
			<view class="scanContainer">
				<view class="text-align_center">
					<image class="icon" :src="communityInfo.head_img" mode=""></image>
				</view>
                <view class="text-align_center " style="margin: 0rpx 0 60rpx;">
                	{{communityInfo.name}}
                </view>
				<view class="">
					<image class="scan" :src="communityInfo.img" mode=""></image>
				</view>
				<view class="text-align_center margin-top_20rpx" >
					点击打开二维码,长按识别
				</view>
			</view>
		</view>


	</view>
</template>

<script>
	export default {
		components: {

		},
		data() {
			return {
				title: 'Hello',
				seconds: '',
				showBtn: false,
				communityInfo:null,
				userInfo: uni.getStorageSync("userInfo"),

			}
		},
		onLoad(options) {
             if(options.id){
				 this.communityInfoFn(options.id)
			 }
			 
		},
		methods: {
			async communityInfoFn(id){
				const resPoster = await this.$http.post({
					url: this.$api.communityInfo,
					data: {
				
						community_id: id
				
					},
					headers: {
						'Authorization': this.userInfo.token
					}
				
				})
				
				if (resPoster.code == 0) {
				  
				   
				    this.communityInfo=resPoster.data
					console.log(this.communityInfo)
				
				
				} else {
				 
					this.$sun.toast(resPoster.msg, 'none')
				}
			}
			
		}
	}
</script>

<style lang="less" scoped>
	.bgIndex {
		position: relative;
		width: 1040rpx;
		height: 678rpx;
		background-repeat: no-repeat;
		background-size: cover;
		background-image: url('http://yunhunjian123.oss-cn-shanghai.aliyuncs.com/2024-06-13/5af5e202406130938189217.png');
		transform: translate(-136rpx, -266rpx);

		.scanContainer {
			position: absolute;

			height: 1200rpx;
			background-color: #fff;
			padding: 84rpx;
			transform: translate(27%, 31%);

			.icon {
				width: 136rpx;
				height: 136rpx;
				margin-bottom: 20rpx;
			}

			.scan {
				width: 500rpx;
				height: 500rpx;
			}
		}


	}
</style>